package cn.iocoder.lw.module.core.controller.admin.project.vo;

import cn.iocoder.lw.framework.common.enums.CommonStatusEnum;
import cn.iocoder.lw.framework.common.validation.InEnum;
import cn.iocoder.lw.framework.common.validation.Mobile;
import cn.iocoder.lw.module.core.enums.DictTypeConstants;
import com.mzt.logapi.starter.annotation.DiffLogField;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import static cn.iocoder.lw.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 核心项目新增/修改 Request VO")
@Data
public class CoreProjectSaveReqVO {

    @Schema(description = "项目编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    private Long id;

    @Schema(description = "项目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "示例项目")
    @DiffLogField(name = "项目名称")
    @Size(max = 100, message = "项目名称长度不能超过100个字符")
    private String name;

    @Schema(description = "项目所属区域", requiredMode = Schema.RequiredMode.REQUIRED, example = "110101")
    @DiffLogField(name = "项目所属区域")
    @NotNull(message = "项目所属区域不能为空")
    private String areaId;

    @Schema(description = "项目地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "北京市朝阳区示例街道123号")
    @DiffLogField(name = "项目地址")
    @Size(max = 200, message = "项目地址长度不能超过200个字符")
    private String detailAddress;

    @Schema(description = "项目联系人", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @DiffLogField(name = "项目联系人")
    @Size(max = 50, message = "项目联系人长度不能超过50个字符")
    private String contactName;

    @Schema(description = "联系人手机号", requiredMode = Schema.RequiredMode.REQUIRED, example = "13800138000")
    @DiffLogField(name = "联系人手机号")
    @Mobile
    private String contactMobile;

    @Schema(description = "代理商名称", example = "示例代理商")
    @DiffLogField(name = "代理商名称")
    @Size(max = 100, message = "代理商名称长度不能超过100个字符")
    private String agentName;

    @Schema(description = "渠道联系人", example = "李四")
    @DiffLogField(name = "渠道联系人")
    @Size(max = 50, message = "渠道联系人长度不能超过50个字符")
    private String channelContactName;

    @Schema(description = "渠道手机号", example = "13900139000")
    @DiffLogField(name = "渠道手机号")
    @Mobile
    private String channelContactMobile;

    @Schema(description = "服务商名称", example = "示例服务商")
    @DiffLogField(name = "服务商名称")
    @Size(max = 100, message = "服务商名称长度不能超过100个字符")
    private String serviceProviderName;

    @Schema(description = "服务商联系人", example = "王五")
    @DiffLogField(name = "服务商联系人")
    @Size(max = 50, message = "服务商联系人长度不能超过50个字符")
    private String serviceProviderContactName;

    @Schema(description = "服务商手机号", example = "13700137000")
    @DiffLogField(name = "服务商手机号")
    @Mobile
    private String serviceProviderContactMobile;

    @Schema(description = "项目类型（集中式/分散式）", requiredMode = Schema.RequiredMode.REQUIRED, example = "集中式")
    @DiffLogField(name = "项目类型")
    @Size(max = 20, message = "项目类型长度不能超过20个字符")
    private String projectType;

    @Schema(description = "房间数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    @DiffLogField(name = "房间数量")
    @NotNull(message = "房间数量不能为空")
    private Integer roomCount;

    @Schema(description = "维保有效期开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @DiffLogField(name = "维保有效期开始时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime maintenanceStartTime;

    @Schema(description = "维保有效期结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @DiffLogField(name = "维保有效期结束时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime maintenanceEndTime;

    @Schema(description = "维保结算类型（按次/按月）", requiredMode = Schema.RequiredMode.REQUIRED, example = "按月")
    @DiffLogField(name = "维保结算类型")
    @Size(max = 20, message = "维保结算类型长度不能超过20个字符")
    private String maintenanceSettlementType;

    @Schema(description = "流量有效开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @DiffLogField(name = "流量有效开始时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime trafficStartTime;

    @Schema(description = "流量有效结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @DiffLogField(name = "流量有效结束时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime trafficEndTime;

    @Schema(description = "平台类型（私有化/可供/平台SAAS）", requiredMode = Schema.RequiredMode.REQUIRED, example = "平台SAAS")
    @DiffLogField(name = "平台类型")
    @Size(max = 50, message = "平台类型长度不能超过50个字符")
    private String platformType;

    @Schema(description = "维护有效开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @DiffLogField(name = "维护有效开始时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime maintainStartTime;

    @Schema(description = "维护有效结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @DiffLogField(name = "维护有效结束时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime maintainEndTime;

    @Schema(description = "负责人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @DiffLogField(name = "负责人")
    @NotNull(message = "负责人不能为空")
    private Long ownerUserId;

    @Schema(description = "备注", example = "这是一个示例项目")
    @DiffLogField(name = "备注")
    @Size(max = 500, message = "备注长度不能超过500个字符")
    private String remark;

    @Schema(description = "项目状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @DiffLogField(name = "项目状态")
    @InEnum(CommonStatusEnum.class)
    private Integer status;
    

}